home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / embedded / develop / libsrc11.arc / WRBLKHC.C < prev    next >
C/C++ Source or Header  |  1989-04-27  |  1KB  |  39 lines

  1. /*    wrblkhc.c 4.2        */
  2.  
  3. /*F****************************************************************************
  4.  
  5. FUNCTION NAME:    wrblkhc
  6.  
  7. ACTION:        Writes count characters to the handshake hardware of Port C.
  8.  
  9. PARAMETERS:
  10.         array:    pointer to an array of bytes to be written to Port C.
  11.  
  12.         count:    number of bytes to write to Port C.
  13.  
  14. RETURNS:    (void)
  15.  
  16. ******************************************************************************/
  17.  
  18. #include <hc11/directives.h>
  19.  
  20. SMALL
  21. void wrblkhc(array, count)
  22.  
  23.     unsigned short    *array;        /* pointer to data to be written */
  24.     int        count;        /* number of bytes to be written */
  25.  
  26.     {
  27.  
  28.     /****************************************************************/
  29.     /*    Note that "while ((count--) > 0)" is equivalent to    */
  30.     /*    "while ((--count) >= 0)" but the pre-decrement        */
  31.     /*    version is more efficient than the post-decrement    */
  32.     /*    verison.                        */
  33.     /****************************************************************/
  34.  
  35.     while ((--count) >= 0)
  36.         wrbythc((unsigned) *(array++));
  37.  
  38.     }    /* end of wrblkhc    */
  39.